<div ng-controller="departmentFormController">
	<div class="row" ng-init="getInitData()">
		<form class="col-md-12 form-horizontal" name="departmentForm" novalidate>
			<div class="row rowddd"></div>
			<div class="form-group">
				<div class="col-md-10">
					<input class="btn btn-info col-md-offset-1" type="button"
						value="保存" type="submit" ng-click="saveDepartment(department)"/>
					<input
						class="btn btn-info" type="button" value="保存并新增" type="submit"
						ng-show="showSaveAndAddButton" ng-click="saveAndAddDepartment(department)">
					<input class="btn btn-primary" type="button" value="返回"
						ng-click="returnList()" />
				</div>
			</div>
			<div class="form-group col-md-6">
				<label class="col-md-3 control-label" for="realName"> 部门名称: </label>
				<div class="col-md-9">
					<input type="text" class="form-control" ng-model="department.name"
						name="name" required />
				</div>
			</div>
			<div class="form-group col-md-6">
				<label class="col-md-3 control-label" for="code"> 部门编码: </label>
				<div class="col-md-9">
					<input type="text" class="form-control" ng-model="department.code"
						name="code"/>
				</div>
			</div>
			<div class="form-group col-md-6">
				<label class="col-md-3 control-label" for="organizationId"> 所属机构: </label>
				<div class="col-md-9">
				    <select class="form-control" ng-model="department.organizationId"  ng-options="o.EId as o.name for o in organization" ng-change="selectItem()">
				    	<option value="">--- 请选择组织机构 ---</option>
				    </select>
				</div>
			</div>
		</div>
	</form>
	</div>
</div>